package com.shierke.Ume.ui.activity.me

import android.content.Context
import android.os.Bundle
import android.text.Editable
import android.text.TextWatcher
import com.shierke.Ume.R
import com.shierke.Ume.base.BaseActivity
import com.shierke.Ume.util.startActivity
import kotlinx.android.synthetic.main.activity_setting_sign.*

/**
 * Create by Ybx
 * on 2020-10-21
 * Desribe:
 */
class SettingSignActivity : BaseActivity() {


    companion object {
        fun startActivity(context: Context) {
            context.startActivity<SettingSignActivity>()
        }
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)


        setContentView(R.layout.activity_setting_sign)

        setActivityTitleText(getString(R.string.my_setting_sign_activity_title))
        setActivityRightText("OK")



        signEdit.addTextChangedListener(object : TextWatcher {
            override fun afterTextChanged(s: Editable?) {

                val str = s.toString()
                val length = str.length
                textNum.text = length.toString()
            }

            override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
            }

            override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
            }

        })


    }
}